Carlos Garnacho [Fri, 8 Oct 2010 16:32:10 +0000 (18:32 +0200)]
GtkCssProvider: no need for resetting the parser prior to parsing data
This is done anyway on each iteration to parse_rule() in parse_stylesheet()
Carlos Garnacho [Fri, 8 Oct 2010 16:27:22 +0000 (18:27 +0200)]
GtkCssProvider: improve file paths parser.
It will now return a full path, and check about the file being sane.
Carlos Garnacho [Fri, 8 Oct 2010 16:19:34 +0000 (18:19 +0200)]
GtkCssProvider: Transform custom colors to a @define-color rule.
Given there are other rules such as @import (which will be supported),
keep a sane namespace here, so for (re)defining a color name, in the CSS
file it will look like:
@define-color color-name #fff;
@define-color other-color mix (@color-name, #f00, 0.4);
Carlos Garnacho [Fri, 8 Oct 2010 16:13:14 +0000 (18:13 +0200)]
GtkThemingEngine: Do not return a const GtkThemingEngine on load()
Carlos Garnacho [Tue, 5 Oct 2010 23:04:06 +0000 (01:04 +0200)]
Plug some leaks.
Carlos Garnacho [Tue, 5 Oct 2010 22:53:49 +0000 (00:53 +0200)]
Fix typo in the Gtk9Slice parser.
Carlos Garnacho [Tue, 5 Oct 2010 08:56:52 +0000 (10:56 +0200)]
GtkButton: Notify on prelight state change.
Carlos Garnacho [Tue, 5 Oct 2010 08:55:40 +0000 (10:55 +0200)]
GtkThemingEngine: Implement animations between gradients/colors.
Carlos Garnacho [Tue, 5 Oct 2010 08:54:49 +0000 (10:54 +0200)]
GtkSymbolicColor: Use G_DEFINE_BOXED_TYPE
Carlos Garnacho [Tue, 5 Oct 2010 08:54:19 +0000 (10:54 +0200)]
GtkStyleContext: Store animation region for a bunch of paint operations.
Carlos Garnacho [Tue, 5 Oct 2010 08:53:09 +0000 (10:53 +0200)]
GtkStyleContext: Invalidate whole window if no invalidation region is obtained.
Carlos Garnacho [Fri, 24 Sep 2010 20:10:20 +0000 (22:10 +0200)]
GtkCssProvider: use mapped file to read CSS files.
Carlos Garnacho [Fri, 24 Sep 2010 20:09:37 +0000 (22:09 +0200)]
GtkCssProvider: unset filename on load_from_data()
Carlos Garnacho [Fri, 24 Sep 2010 20:08:49 +0000 (22:08 +0200)]
GtkThemingEngine: Use border-image to render borders if an image is available.
Carlos Garnacho [Fri, 24 Sep 2010 20:05:20 +0000 (22:05 +0200)]
GtkCssProvider: Add a parser for 9slice typed properties.
The value it parses is similar to the border-image CSS3 property,
so strings like this will be accepted:
border-image: url (foo.png) 4 3 4 3 repeat repeat;
the image path is relative to the parsed CSS file dirname if no
absolute path is provided.
Carlos Garnacho [Fri, 24 Sep 2010 20:02:39 +0000 (22:02 +0200)]
Register the border-image property
It will contain a 9-sliced image, so it can be rendered as rectangles with any
dimensions.
Carlos Garnacho [Fri, 24 Sep 2010 19:42:18 +0000 (21:42 +0200)]
Add Gtk9Slice
This is a private boxed object to contain information about a border image
in order to render it in a size independent way.
Carlos Garnacho [Wed, 22 Sep 2010 21:44:06 +0000 (23:44 +0200)]
GtkSettings: Add a new provider for the theme CSS file.
Carlos Garnacho [Wed, 22 Sep 2010 21:40:59 +0000 (23:40 +0200)]
GtkStyleContext: Add gtk_style_context_reset_widgets()
This function recalculates the style for all widgets on a screen.
Carlos Garnacho [Wed, 22 Sep 2010 21:39:15 +0000 (23:39 +0200)]
GtkCssProvider: Add gtk_css_provider_get_named()
This functions loads a CSS file from a installed theme.
Carlos Garnacho [Sat, 11 Sep 2010 10:48:27 +0000 (12:48 +0200)]
Add generic providers per-screen.
The providers are added as soon as gtk GtkSettings object for the screen
is created.
Carlos Garnacho [Sat, 11 Sep 2010 10:47:31 +0000 (12:47 +0200)]
GtkStyleContext: invalidate context when setting the screen
Carlos Garnacho [Sat, 11 Sep 2010 10:45:42 +0000 (12:45 +0200)]
GtkWidget: Set style context's screen before the widget_path.
This is so the style context has all necessary information before
triggering a style change on setting the path.
Carlos Garnacho [Sat, 11 Sep 2010 10:42:35 +0000 (12:42 +0200)]
GtkStyleContext: Add gtk_style_context_[add|remove]_provider_for_screen()
These functions allow per-screen style providers. also, the changed signal
will be emitted whenever a style context changes.
Carlos Garnacho [Sat, 11 Sep 2010 10:40:31 +0000 (12:40 +0200)]
GtkWidget: Add gtk_widget_reset_style().
This function is analogous to gtk_widget_reset_rc_styles(),
updates style recursively on a widget.
Carlos Garnacho [Sat, 11 Sep 2010 10:36:54 +0000 (12:36 +0200)]
GtkWidget: Add the style-updated signal
This signal is emitted whenever the widget's style changes.
Carlos Garnacho [Sat, 11 Sep 2010 10:10:50 +0000 (12:10 +0200)]
GtkStyle: Protect against padding being NULL
Carlos Garnacho [Sat, 11 Sep 2010 10:18:26 +0000 (12:18 +0200)]
GtkStyleContext: Add gtk_style_context_invalidate().
This function will regenerate all styling information.
Carlos Garnacho [Sat, 11 Sep 2010 10:10:25 +0000 (12:10 +0200)]
GtkStyleSet: Fix typo
Carlos Garnacho [Thu, 2 Sep 2010 00:14:10 +0000 (02:14 +0200)]
GtkThemingEngine: use background-image in render_background()
Carlos Garnacho [Thu, 2 Sep 2010 00:12:26 +0000 (02:12 +0200)]
GtkStyleSet: Register a "background-image" property.
Ironically, it currently just handles gradients, the name is to conform
to current CSS gradient implementation trends.
Carlos Garnacho [Thu, 2 Sep 2010 00:11:12 +0000 (02:11 +0200)]
GtkStyleSet: Handle GtkGradients as a replacement for cairo_pattern_t
The former will handle GtkSymbolicColors, which will be resolved and
cached at query time.
Carlos Garnacho [Thu, 2 Sep 2010 00:06:05 +0000 (02:06 +0200)]
GtkCssProvider: Add a parser for gradients.
Carlos Garnacho [Thu, 2 Sep 2010 00:01:01 +0000 (02:01 +0200)]
Add GtkGradient.
This type defines a gradient between 2 symbolic colors, with any number
of color stop between these. At the moment it has been put besides
GtkSymbolicColor, although should be completely private, it will likely
need extending in the future for radial gradients.
At some point, it maybe should also be used for images, so painting
both a gradient and an image is consistent.
Carlos Garnacho [Wed, 1 Sep 2010 23:58:48 +0000 (01:58 +0200)]
GtkStyleSet: Set an empty default_value if none is provided.
Carlos Garnacho [Wed, 1 Sep 2010 23:49:59 +0000 (01:49 +0200)]
GtkCssProvider: strip whitespaces in symbolic color values.
Carlos Garnacho [Wed, 1 Sep 2010 23:48:24 +0000 (01:48 +0200)]
Allow linefeeds in property values.
Carlos Garnacho [Wed, 1 Sep 2010 23:45:17 +0000 (01:45 +0200)]
Add a boxed type for cairo_pattern_t.
Carlos Garnacho [Mon, 30 Aug 2010 20:41:12 +0000 (22:41 +0200)]
GtkSettings: implement GtkStyleProvider
Carlos Garnacho [Mon, 30 Aug 2010 20:39:47 +0000 (22:39 +0200)]
GtkStyle: Fill in x/ythickness and font_desc from the style context.
Carlos Garnacho [Mon, 30 Aug 2010 20:35:30 +0000 (22:35 +0200)]
GtkStyleSet: Register "margin" property.
Carlos Garnacho [Mon, 30 Aug 2010 20:34:31 +0000 (22:34 +0200)]
Add basic parser for GtkBorder properties.
Different units aren't supported, it takes 1 to 4 integers representing
pixel distances.
Carlos Garnacho [Mon, 23 Aug 2010 16:00:31 +0000 (18:00 +0200)]
GtkStyle: Allow GTK_ARROW_NONE.
Carlos Garnacho [Mon, 23 Aug 2010 16:00:06 +0000 (18:00 +0200)]
GtkNotebook: invert tab drawing order so region flags are set correctly.
Carlos Garnacho [Fri, 20 Aug 2010 12:58:54 +0000 (14:58 +0200)]
Get rid of GdkPangoRenderer code in GtkThemingEngine.
Carlos Garnacho [Fri, 20 Aug 2010 12:09:30 +0000 (14:09 +0200)]
Replace GdkRegion and GdkRectangle with their cairo counterparts.
Carlos Garnacho [Fri, 20 Aug 2010 11:56:30 +0000 (13:56 +0200)]
Remove gtkalias from style context code.
Carlos Garnacho [Fri, 20 Aug 2010 09:50:39 +0000 (11:50 +0200)]
GtkCssProvider: Add gtk_css_provider_load_from_path()
Carlos Garnacho [Thu, 19 Aug 2010 23:16:40 +0000 (01:16 +0200)]
Plug a bunch of leaks.
Carlos Garnacho [Thu, 19 Aug 2010 20:47:44 +0000 (22:47 +0200)]
GtkButton: Notify on active state when (un)depressed
Carlos Garnacho [Thu, 19 Aug 2010 20:47:02 +0000 (22:47 +0200)]
GtkThemingEngine: Animate checkboxes activation.
Carlos Garnacho [Thu, 19 Aug 2010 20:45:22 +0000 (22:45 +0200)]
GtkThemingEngine: Add progress arg to gtk_theming_engine_is_state_set()
Carlos Garnacho [Thu, 19 Aug 2010 20:42:16 +0000 (22:42 +0200)]
GtkWidget: Update GtkStyleContext animation regions on allocation change.
Carlos Garnacho [Thu, 19 Aug 2010 20:35:42 +0000 (22:35 +0200)]
GtkStyleContext: Add animation machinery.
Animation regions are confined through gtk_style_context_[push|pop]_animatable_region,
anything that's painted between these calls will be invalidated if an animation starts
for any of the regions in the stack.
gtk_style_context_notify_state_change() may be called from widgets to indicate a
change for a given GtkStateType, in that case an animation will be started if there
is an animation description for the widget/state.
Carlos Garnacho [Thu, 19 Aug 2010 20:00:04 +0000 (22:00 +0200)]
GtkStyleContext: Declare gtk_style_context_list_classes() in header.
Carlos Garnacho [Thu, 19 Aug 2010 19:50:19 +0000 (21:50 +0200)]
GtkCssProvider: Parse properties of type GtkAnimationDescription.
Carlos Garnacho [Thu, 19 Aug 2010 19:49:22 +0000 (21:49 +0200)]
GtkStyleSet: Register the "transition" property.
Carlos Garnacho [Thu, 19 Aug 2010 19:45:30 +0000 (21:45 +0200)]
Add GtkAnimationDescription as a private boxed object.
This struct will be used to represent an animation in GtkStyleSet. It
will only be used internally in GtkStyleContext in order to trigger
animations, engines shouldn't need this.
Carlos Garnacho [Thu, 19 Aug 2010 19:40:41 +0000 (21:40 +0200)]
Add GtkTimeline as a private object.
This will only be used internally by GtkStyleContext in order
to animate state changes. When a proper animation framework is
introduced in GTK+, it may be ditched.
Carlos Garnacho [Mon, 16 Aug 2010 17:09:34 +0000 (19:09 +0200)]
Move all theming stack to use GtkStateFlags.
This support goes from the theming engines, which are able to retrieve
style for different combined states to the CSS provider, where several
state pseudo-classes may be specified, such as:
GtkButton:active:prelight {}
Carlos Garnacho [Mon, 16 Aug 2010 17:08:11 +0000 (19:08 +0200)]
GtkStyleContext: Return insertion position if not found when matching classes/regions
Carlos Garnacho [Mon, 16 Aug 2010 16:40:03 +0000 (18:40 +0200)]
GtkStyle: set the active flag depending on shadow_type in draw_box().
Carlos Garnacho [Fri, 6 Aug 2010 10:09:09 +0000 (12:09 +0200)]
GtkCssProvider: Use class for tooltips.
Carlos Garnacho [Fri, 6 Aug 2010 10:08:48 +0000 (12:08 +0200)]
GtkCssProvider: Parse and match class info.
Carlos Garnacho [Fri, 6 Aug 2010 10:06:29 +0000 (12:06 +0200)]
Set classes info in GtkWidgetPath.
Carlos Garnacho [Fri, 6 Aug 2010 10:05:42 +0000 (12:05 +0200)]
GtkStyleContext: Add gtk_style_context_list_classes().
Carlos Garnacho [Fri, 6 Aug 2010 09:59:35 +0000 (11:59 +0200)]
GtkWidgetPath: Add methods to include class info in paths.
Carlos Garnacho [Thu, 5 Aug 2010 09:08:51 +0000 (11:08 +0200)]
s/child class/region/ everywhere.
"Child class" is an invented term anyway, and it conceptually defines
identifiable regions in widgets.
Carlos Garnacho [Thu, 5 Aug 2010 09:28:15 +0000 (11:28 +0200)]
GtkStyleContext: Rename internal struct.
GtkStyleRegion has been renamed to GtkStyleInfo, as it doesn't really
have much to do with regions itself, the information it contains does.
This struct is used in save/restore.
Carlos Garnacho [Wed, 4 Aug 2010 15:51:19 +0000 (17:51 +0200)]
GtkThemingEngine: Add gtk_theming_engine_register_property().
This function may be used for custom property registration from
theming engines. The property names will have the
-${engine-type-name}-${prop-name} format, the parser has been
modified to allow properties with '-' as the first char.
Carlos Garnacho [Wed, 4 Aug 2010 15:50:52 +0000 (17:50 +0200)]
GtkStyleSet: Fix compiler warning.
Carlos Garnacho [Wed, 4 Aug 2010 15:49:15 +0000 (17:49 +0200)]
GtkStyleSet: Allow custom parsers on registered properties.
Carlos Garnacho [Wed, 4 Aug 2010 12:51:01 +0000 (14:51 +0200)]
GtkCssProvider: Parse correctly widget types with a name.
There's now a distinction between:
GtkLabel#label-name: Label with name "label-name"
GtkWindow #label-name: Window containing a widget named "label-name"
Carlos Garnacho [Wed, 4 Aug 2010 11:11:50 +0000 (13:11 +0200)]
Compare widget names as GQuarks in style matching.
Carlos Garnacho [Wed, 4 Aug 2010 10:50:37 +0000 (12:50 +0200)]
GtkWidgetPath: Make API more consistent.
Carlos Garnacho [Wed, 4 Aug 2010 10:19:23 +0000 (12:19 +0200)]
Compare region names as quarks in style matching.
Carlos Garnacho [Wed, 4 Aug 2010 09:46:01 +0000 (11:46 +0200)]
GtkCssProvider: Set child combinators in default CSS.
Carlos Garnacho [Wed, 4 Aug 2010 09:44:32 +0000 (11:44 +0200)]
GtkCssProvider: Parse and compare widget names.
Carlos Garnacho [Wed, 4 Aug 2010 09:43:18 +0000 (11:43 +0200)]
GtkCssProvider: Don't jump too eagerly to the next element when comparing selectors.
Carlos Garnacho [Wed, 4 Aug 2010 09:42:08 +0000 (11:42 +0200)]
GtkCssProvider: Immediately bail out if GType couldn't be resolved.
Carlos Garnacho [Wed, 4 Aug 2010 09:36:21 +0000 (11:36 +0200)]
GtkCssProvider: Small optimization.
Sven Herzberg [Thu, 5 Aug 2010 14:21:47 +0000 (16:21 +0200)]
GtkCssProvider: don't ignore custom attributes
* gtk/gtkcssprovider.c: don't ignore custom attribites (which can be
added by theme engines)
Sven Herzberg [Thu, 5 Aug 2010 14:21:12 +0000 (16:21 +0200)]
GtkWidgetPath: properly use const
* gtk/gtkwidgetpath.c,
* gtk/gtkwidgetpath.h: use const where possible
Carlos Garnacho [Tue, 3 Aug 2010 18:38:23 +0000 (20:38 +0200)]
GtkThemingEngine: Render correctly spinbutton buttons.
Carlos Garnacho [Tue, 3 Aug 2010 18:37:53 +0000 (20:37 +0200)]
GtkStyle: set junction details in spinbutton buttons.
Carlos Garnacho [Tue, 3 Aug 2010 18:36:09 +0000 (20:36 +0200)]
GtkThemingEngine: Add gtk_theming_engine_get_junction_sides().
Carlos Garnacho [Tue, 3 Aug 2010 18:33:53 +0000 (20:33 +0200)]
GtkStyleContext: Add gtk_style_context_[gs]et_junction_sides().
These functions will help widgets specify how does one element being painted
relate to other contiguous elements.
Carlos Garnacho [Tue, 3 Aug 2010 18:32:25 +0000 (20:32 +0200)]
Add GtkJunctionSides flags.
Carlos Garnacho [Tue, 3 Aug 2010 18:30:26 +0000 (20:30 +0200)]
GtkStyleContext: Add gtk_style_context_lookup_color().
gtk_style_lookup_color() now uses this function internally.
Carlos Garnacho [Tue, 3 Aug 2010 18:29:07 +0000 (20:29 +0200)]
GtkStyleSet: Register the "border" property.
Carlos Garnacho [Tue, 3 Aug 2010 18:27:32 +0000 (20:27 +0200)]
GtkThemingEngine: fix typo in function declaration.
Carlos Garnacho [Tue, 3 Aug 2010 18:26:53 +0000 (20:26 +0200)]
GtkThemingEngine: Add gtk_theming_engine_get_direction().
Carlos Garnacho [Mon, 2 Aug 2010 15:24:27 +0000 (17:24 +0200)]
GtkWidget: Set style context direction.
Carlos Garnacho [Mon, 2 Aug 2010 15:18:53 +0000 (17:18 +0200)]
GtkStyleContext: Add gtk_style_context_[gs]et_direction().
Carlos Garnacho [Mon, 2 Aug 2010 14:16:50 +0000 (16:16 +0200)]
GtkWidget: Add the default CSS provider to all style contexts.
Carlos Garnacho [Mon, 2 Aug 2010 14:16:03 +0000 (16:16 +0200)]
GtkCssProvider: Add gtk_css_provider_get_default().
This method returns a GtkCssProvider with the default style information
loaded.
Carlos Garnacho [Mon, 2 Aug 2010 14:15:06 +0000 (16:15 +0200)]
GtkStyle: Move gtk_render_* calls to default vmethod implementations.
Carlos Garnacho [Mon, 2 Aug 2010 14:14:17 +0000 (16:14 +0200)]
GtkWidget: Create GtkStyle on top of GtkStyleContext.
Carlos Garnacho [Mon, 2 Aug 2010 14:11:40 +0000 (16:11 +0200)]
GtkWidget: Construct style for partial widget hierarchies.
Some unparented widgets like to ask style details, so now the style is
constructed regardless of the parent being present or not, and then
reconstructed if the parent changes.
Carlos Garnacho [Mon, 2 Aug 2010 14:05:58 +0000 (16:05 +0200)]
GtkStyle: Optionally construct above a GtkStyleContext.